package com.livesource.client.web.liveTaskBoard;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.livesource.client.model.entry.ProjectClass;

/**
 * 
 * @UserInterface
 */
public class TaskPanel extends VerticalPanel {

	public TaskPanel(final ProjectClass entry) {

		this.setBorderWidth(1);

		VerticalPanel vpIn = new VerticalPanel();

		vpIn.setSpacing(5);

		String task = entry.getFeatureName();

		if (entry.getFeatureDescription() != null
				&& !entry.getFeatureDescription().equals("")) {

			task += ": " + entry.getFeatureDescription();
		}

		HTML htmlName = new HTML("<font size=1><a href=#>" + task
				+ "</a></font>");

		htmlName.addClickHandler(new ClickHandler() {

			@Override
			public void onClick(ClickEvent event) {

			}
		});

		vpIn.add(htmlName);

		this.add(vpIn);
	}
}
